package com.easyattendance.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="TBL_ALLTIMESLOTS")
@IdClass(AllTimeSlotsPK.class)
public class AllTimeSlots implements Serializable{
	
	@Id
	@Column(name="time_slot",length=15)
	private String time_slot;
	
	@Id
	@GenericGenerator(name="section_id",strategy="foreign")
	@Column(name="section_id", nullable=false,length=10)
	private String section_id;	
	
	@ManyToOne
	@JoinColumn(name="section_id", insertable=false, updatable=false, referencedColumnName="section_id")
	private Section section;

	public AllTimeSlots() {
		super();
	}
	
	

	public AllTimeSlots(String time_slot, String section_id, Section section) {
		super();
		this.time_slot = time_slot;
		this.section_id = section_id;
		this.section = section;
	}



	public AllTimeSlots(String time_slot, Section section) {
		super();
		this.time_slot = time_slot;
		this.section = section;
	}

	public String getTime_slot() {
		return time_slot;
	}

	public void setTime_slot(String time_slot) {
		this.time_slot = time_slot;
	}

	public Section getSection() {
		return section;
	}

	public void setSection(Section section) {
		this.section = section;
	}

	public String getSection_id() {
		return section_id;
	}

	public void setSection_id(String section_id) {
		this.section_id = section_id;
	}
	
}
